package concurrent.lock;

import java.util.Queue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * Author: Jason Wu
 * Date  : 2013-11-28
 */
public class TestObjectLock {
    public static void main(String[] args) {
        Queue<Integer> numberList = new LinkedBlockingQueue<Integer>();
        for (int i = 0; i < 100; i++) {
            new Thread(new PutObjectTask(i, numberList)).start();
            new Thread(new RemoveObjectTask(numberList)).start();
        }
    }
}
